import type { RecursiveRequired, Settings } from '#/global'
import settingsDefault from '@/settings.default'
import { merge } from '@/utils/object'
import { cloneDeep } from 'es-toolkit'

const globalSettings: Settings.all ={
  "app": {
    "enablePermission": true,
    "routeBaseOn": 'backend',
    "enableDynamicTitle": true
  },
  "menu": {
    "mode": "head",
    "mainMenuClickMode": "smart",
    "enableSubMenuCollapseButton": true,
    "enableHotkeys": true
  },
  "tabbar": {
    "enable": true,
    "enableIcon": true,
    "enableHotkeys": true
  },
  "toolbar": {
    "fullscreen": true,
    "pageReload": true,
    "colorScheme": true
  },
  "enablePageDesigner": false
}

export default merge(globalSettings, cloneDeep(settingsDefault)) as RecursiveRequired<Settings.all>
